package com.wanqing.community.manager;

import java.util.List;
import java.util.Map;

import com.wanqing.community.bean.RoleBean;
import com.wanqing.community.util.CommunityException;
import com.wanqing.community.util.ConditionParse;

/**
 * 角色管理Manager
 * All right reserved.
 * @version 
 */
public interface RoleManager {

	/**
	 * 增加角色
	 * <p>Description:<p>
	 * <p>modifiContent:<p>
	 * @param role
	 * @return
	 * @throws CommunityException
	 */
	boolean addRole(RoleBean role) throws CommunityException;
	
	/**
	 * 修改角色
	 * <p>Description:<p>
	 * <p>modifiContent:<p>
	 * @param role
	 * @return
	 * @throws CommunityException
	 */
	boolean updateRole(RoleBean role) throws CommunityException;
	
	/**
	 * 得到角色数
	 * <p>Description:<p>
	 * <p>modifiContent:<p>
	 * @param condParse
	 * @return
	 * @throws CommunityException
	 */
	int getRoleCount(ConditionParse condParse) throws CommunityException;
	
	/**
	 * 分页查询角色
	 * <p>Description:<p>
	 * <p>modifiContent:<p>
	 * @param condParse
	 * @param currPage
	 * @param pageSize
	 * @return
	 * @throws CommunityException
	 */
	List<RoleBean> queryRole(ConditionParse condParse,int currPage,int pageSize) throws CommunityException;
	
	/**
	 * 删除角色
	 * <p>Description:<p>
	 * <p>modifiContent:<p>
	 * @param condParse
	 * @return
	 * @throws CommunityException
	 */
	boolean deleteRole(List<String> list) throws CommunityException;
	
	/**
	 * <p>Description：批量添加角色权限<p>
	 * <p>modifiContent:<p>
	 * @param list
	 * @return
	 * @throws CommunityException
	 */
	boolean addRoleAuthor(List<Map<String, Object>> list) throws CommunityException;
	
	/**
	 * 
	 * <p>Description:查询角色对应的权限<p>
	 * <p>modifiContent:<p>
	 * @param roleId
	 * @return
	 * @throws CommunityException
	 */
	List<RoleBean> queryOperaAuthorRole(String roleId) throws CommunityException;
	/**
	 * 
	 * <p>Description:<p>
	 * <p>modifiContent:<p>
	 * @return
	 * @throws CommunityException
	 */
	List<RoleBean> listRole() throws CommunityException;
}
